cmake_minimum_required(VERSION 3.28)
project(titanfall2-sdk)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")

set(CMAKE_CXX_STANDARD 26)
add_library(titanfall2-sdk STATIC source/Player.cpp)


target_include_directories(titanfall2-sdk PUBLIC include)
target_compile_options(titanfall2-sdk PRIVATE /W4 /WX)


add_subdirectory(source)
add_subdirectory(extlibs)

target_link_libraries(titanfall2-sdk PUBLIC omath)
target_link_libraries(titanfall2-sdk PRIVATE signature_scanner)
target_link_libraries(titanfall2-sdk PRIVATE minhook)
target_link_libraries(titanfall2-sdk PRIVATE d3d11)
target_compile_definitions(titanfall2-sdk PRIVATE WIN32_LEAN_AND_MEAN)